package com.wx.wxapp.controller;

import com.wx.wxapp.entity.Food;
import com.wx.wxapp.service.FoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class FoodController {
    @Autowired
    private FoodService foodService;

    //获取用户关于食物经验的发帖纪录
    @RequestMapping(value = "/getFoodCards",method = RequestMethod.GET)
    public List<Food> GetFoodCards(@RequestParam("openid")String openid){
        return foodService.getFoodCard(openid);
    }

}
